/*
 Navicat Premium Data Transfer

 Source Server         : 本地
 Source Server Type    : MySQL
 Source Server Version : 50732
 Source Host           : 127.0.01:3306
 Source Schema         : tprbac

 Target Server Type    : MySQL
 Target Server Version : 50732
 File Encoding         : 65001

 Date: 12/06/2021 17:07:02
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for config
-- ----------------------------
DROP TABLE IF EXISTS `config`;
CREATE TABLE `config` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `value` varchar(255) DEFAULT NULL,
  `code` varchar(255) DEFAULT NULL,
  `delete_flag` tinyint(1) DEFAULT '0' COMMENT '默认0 未删除 1删除',
  `status` tinyint(1) DEFAULT '0' COMMENT '默认0 有效1无效',
  `created_by` int(11) DEFAULT NULL,
  `created_time` datetime DEFAULT NULL,
  `update_by` int(11) DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of config
-- ----------------------------
BEGIN;
INSERT INTO `config` VALUES (1, '上传配置', '{\"upload_status\":\"1\"}', '10001', 0, 0, NULL, NULL, 0, '2021-06-10 17:15:46');
COMMIT;

-- ----------------------------
-- Table structure for permission
-- ----------------------------
DROP TABLE IF EXISTS `permission`;
CREATE TABLE `permission` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `pid` int(11) DEFAULT NULL,
  `info` varchar(255) DEFAULT NULL,
  `route` varchar(255) DEFAULT NULL,
  `is_show` tinyint(1) NOT NULL DEFAULT '0' COMMENT '默认0不显示 1显示',
  `title` varchar(255) DEFAULT NULL,
  `icon` varchar(255) DEFAULT NULL,
  `menu_path` varchar(255) DEFAULT NULL,
  `menu_name` varchar(255) DEFAULT NULL,
  `component` varchar(255) DEFAULT NULL,
  `delete_flag` tinyint(1) NOT NULL DEFAULT '0' COMMENT '默认0 未删除 1删除',
  `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '默认0 有效 1无效',
  `created_by` int(11) DEFAULT NULL,
  `created_time` datetime DEFAULT NULL,
  `update_by` int(11) DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of permission
-- ----------------------------
BEGIN;
INSERT INTO `permission` VALUES (1, '系统设置', 0, '系统设置', '', 1, '系统设置', 'component', '/system', 'system', 'Layout', 0, 0, 0, '2021-06-09 08:26:04', 0, '2021-06-10 14:49:59');
INSERT INTO `permission` VALUES (2, '账号管理', 1, '账号管理', '', 1, '账号管理', 'user', '/system/user-index', 'user-index', 'user/index', 0, 0, 0, '2021-06-09 09:19:29', 0, '2021-06-10 14:53:22');
INSERT INTO `permission` VALUES (3, '角色管理', 1, '角色管理', NULL, 1, '角色管理', 'el-icon-s-flag', '/system/role-index', 'role-index', 'role/index', 0, 0, 0, '2021-06-09 12:00:17', 0, '2021-06-10 14:53:29');
INSERT INTO `permission` VALUES (4, '权限管理', 1, '权限管理', NULL, 1, '权限管理', 'lock', '/system/auth-index', 'auth-index', 'auth/index', 0, 0, 0, '2021-06-09 12:00:29', 0, '2021-06-10 14:53:05');
INSERT INTO `permission` VALUES (5, '账号列表', 2, '账号列表', '/api/admin/getUserList,/api/admin/GetRoleAll', 0, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, '2021-06-09 12:01:26', 0, '2021-06-10 14:54:31');
INSERT INTO `permission` VALUES (6, '账号修改', 2, '账号修改', '/api/admin/updateUser,/api/admin/GetRoleAll,/api/admin/CheckUserStatus', 0, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, '2021-06-09 12:02:12', 0, '2021-06-10 17:17:53');
INSERT INTO `permission` VALUES (7, '账号添加', 2, '账号添加', '/api/admin/addUser,/api/admin/GetRoleAll,/api/admin/upload', 0, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, '2021-06-09 12:02:28', 0, '2021-06-10 14:58:02');
INSERT INTO `permission` VALUES (8, '账号删除', 2, '账号删除', '/api/admin/deleteUser', 0, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, '2021-06-09 12:02:40', 0, '2021-06-10 14:58:43');
INSERT INTO `permission` VALUES (9, '角色添加', 3, '角色添加', '/api/admin/addRole,/api/admin/GetCheckedTree,/api/admin/GetRoleOption', 0, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, '2021-06-09 12:03:20', 0, '2021-06-10 14:59:25');
INSERT INTO `permission` VALUES (10, '角色列表', 3, '角色列表', '/api/admin/GetRoleList,/api/admin/GetRoleOption,/api/admin/GetPermissionTree', 0, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, '2021-06-09 12:03:31', 0, '2021-06-10 14:59:50');
INSERT INTO `permission` VALUES (11, '角色修改', 3, '角色修改', '/api/admin/updateRole,/api/admin/GetCheckedTree,/api/admin/GetRoleOption,/api/admin/CheckRoleStatus', 0, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, '2021-06-09 12:03:45', 0, '2021-06-10 15:00:59');
INSERT INTO `permission` VALUES (12, '角色删除', 3, '角色删除', '/api/admin/DelRole', 0, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, '2021-06-09 12:03:56', 0, '2021-06-10 15:01:24');
INSERT INTO `permission` VALUES (13, '权限列表', 4, '权限列表', '/api/admin/getPermission,/api/admin/getPermissionOption', 0, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, '2021-06-09 12:04:13', 0, '2021-06-10 15:01:50');
INSERT INTO `permission` VALUES (14, '权限添加', 4, '权限添加', '/api/admin/AddPermission,/api/admin/getPermissionOption', 0, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, '2021-06-09 12:04:27', 0, '2021-06-10 15:02:09');
INSERT INTO `permission` VALUES (15, '权限修改', 4, '权限修改', '/api/admin/UpdatePermission,/api/admin/getPermissionOption,/api/admin/CheckPermissionShow,/api/admin/CheckPermissionStatus', 0, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, '2021-06-09 12:04:43', 0, '2021-06-10 15:02:25');
INSERT INTO `permission` VALUES (16, '权限删除', 4, '权限删除', '/api/amdin/DelPermission', 0, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, '2021-06-09 12:04:54', 0, '2021-06-10 15:02:56');
INSERT INTO `permission` VALUES (17, '参数设置', 1, '参数设置', '/api/admin/GetConf', 1, '参数设置', 'el-icon-lollipop', '/system/config-index', 'config-index', 'config/index', 0, 0, 0, '2021-06-10 15:05:24', 0, '2021-06-10 15:06:27');
INSERT INTO `permission` VALUES (18, '修改参数设置', 17, '修改参数设置', '/api/admin/SetConf', 0, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, '2021-06-10 15:07:46', NULL, NULL);
COMMIT;

-- ----------------------------
-- Table structure for permission_role
-- ----------------------------
DROP TABLE IF EXISTS `permission_role`;
CREATE TABLE `permission_role` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `permission_id` int(11) DEFAULT NULL,
  `role_id` int(11) DEFAULT NULL,
  `status` tinyint(11) DEFAULT '0' COMMENT '默认 0有效 1无效',
  `delete_flag` tinyint(11) DEFAULT '0' COMMENT '默认0 未删除 1删除',
  `created_by` int(255) DEFAULT NULL,
  `created_time` datetime DEFAULT NULL,
  `update_by` int(11) DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of permission_role
-- ----------------------------
BEGIN;
INSERT INTO `permission_role` VALUES (1, 2, 1, 0, 0, 0, '2021-06-09 14:04:50', 0, '2021-06-10 16:41:08');
INSERT INTO `permission_role` VALUES (2, 1, 1, 0, 0, 0, '2021-06-09 14:04:50', 0, '2021-06-10 16:41:08');
INSERT INTO `permission_role` VALUES (3, 5, 1, 0, 0, 0, '2021-06-09 14:04:50', 0, '2021-06-10 16:41:08');
INSERT INTO `permission_role` VALUES (4, 6, 1, 1, 1, 0, '2021-06-09 14:04:50', 0, '2021-06-10 16:41:08');
INSERT INTO `permission_role` VALUES (5, 7, 1, 1, 1, 0, '2021-06-09 14:04:50', 0, '2021-06-10 16:41:08');
INSERT INTO `permission_role` VALUES (6, 8, 1, 1, 1, 0, '2021-06-09 14:04:50', 0, '2021-06-10 16:41:08');
INSERT INTO `permission_role` VALUES (7, 1, 2, 0, 0, 0, '2021-06-09 14:42:24', 0, '2021-06-10 15:08:08');
INSERT INTO `permission_role` VALUES (8, 2, 2, 0, 0, 0, '2021-06-09 14:42:24', 0, '2021-06-10 15:08:08');
INSERT INTO `permission_role` VALUES (9, 5, 2, 0, 0, 0, '2021-06-09 14:42:24', 0, '2021-06-10 15:08:08');
INSERT INTO `permission_role` VALUES (10, 6, 2, 0, 0, 0, '2021-06-09 14:42:24', 0, '2021-06-10 15:08:08');
INSERT INTO `permission_role` VALUES (11, 7, 2, 0, 0, 0, '2021-06-09 14:42:24', 0, '2021-06-10 15:08:08');
INSERT INTO `permission_role` VALUES (12, 8, 2, 0, 0, 0, '2021-06-09 14:42:24', 0, '2021-06-10 15:08:08');
INSERT INTO `permission_role` VALUES (13, 3, 2, 0, 0, 0, '2021-06-09 14:42:24', 0, '2021-06-10 15:08:08');
INSERT INTO `permission_role` VALUES (14, 9, 2, 0, 0, 0, '2021-06-09 14:42:24', 0, '2021-06-10 15:08:08');
INSERT INTO `permission_role` VALUES (15, 10, 2, 0, 0, 0, '2021-06-09 14:42:24', 0, '2021-06-10 15:08:08');
INSERT INTO `permission_role` VALUES (16, 11, 2, 0, 0, 0, '2021-06-09 14:42:24', 0, '2021-06-10 15:08:08');
INSERT INTO `permission_role` VALUES (17, 12, 2, 0, 0, 0, '2021-06-09 14:42:24', 0, '2021-06-10 15:08:08');
INSERT INTO `permission_role` VALUES (18, 4, 2, 0, 0, 0, '2021-06-09 14:42:24', 0, '2021-06-10 15:08:08');
INSERT INTO `permission_role` VALUES (19, 13, 2, 0, 0, 0, '2021-06-09 14:42:24', 0, '2021-06-10 15:08:08');
INSERT INTO `permission_role` VALUES (20, 14, 2, 0, 0, 0, '2021-06-09 14:42:24', 0, '2021-06-10 15:08:08');
INSERT INTO `permission_role` VALUES (21, 15, 2, 0, 0, 0, '2021-06-09 14:42:24', 0, '2021-06-10 15:08:08');
INSERT INTO `permission_role` VALUES (22, 16, 2, 0, 0, 0, '2021-06-09 14:42:24', 0, '2021-06-10 15:08:08');
INSERT INTO `permission_role` VALUES (23, 9, 1, 1, 1, 0, '2021-06-09 15:47:36', 0, '2021-06-10 16:41:08');
INSERT INTO `permission_role` VALUES (24, 3, 1, 1, 1, 0, '2021-06-09 15:47:36', 0, '2021-06-10 16:41:08');
INSERT INTO `permission_role` VALUES (25, 5, 3, 1, 1, 0, '2021-06-09 16:06:06', 0, '2021-06-09 16:06:08');
INSERT INTO `permission_role` VALUES (26, 2, 3, 1, 1, 0, '2021-06-09 16:06:06', 0, '2021-06-09 16:06:08');
INSERT INTO `permission_role` VALUES (27, 1, 3, 1, 1, 0, '2021-06-09 16:06:06', 0, '2021-06-09 16:06:08');
INSERT INTO `permission_role` VALUES (28, 17, 2, 0, 0, 0, '2021-06-10 15:08:08', NULL, NULL);
INSERT INTO `permission_role` VALUES (29, 18, 2, 0, 0, 0, '2021-06-10 15:08:08', NULL, NULL);
COMMIT;

-- ----------------------------
-- Table structure for role
-- ----------------------------
DROP TABLE IF EXISTS `role`;
CREATE TABLE `role` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `info` varchar(255) DEFAULT NULL,
  `pid` int(11) DEFAULT NULL,
  `status` tinyint(1) DEFAULT '0' COMMENT '默认0有效 1无效',
  `delete_flag` tinyint(1) DEFAULT '0' COMMENT '默认0未删除1删除',
  `created_time` datetime DEFAULT NULL,
  `created_by` tinyint(11) DEFAULT NULL,
  `update_by` tinyint(11) DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of role
-- ----------------------------
BEGIN;
INSERT INTO `role` VALUES (1, '账号管理员', '账号管理员', 0, 0, 0, '2021-06-09 14:04:50', 0, 0, '2021-06-10 16:41:08');
INSERT INTO `role` VALUES (2, '超级管理员', '超级管理员', 0, 0, 0, '2021-06-09 14:42:24', 0, 0, '2021-06-10 15:08:08');
INSERT INTO `role` VALUES (3, '测试1', '测试1', 0, 1, 1, '2021-06-09 16:06:06', 0, 0, '2021-06-09 16:06:08');
COMMIT;

-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account` varchar(255) DEFAULT NULL,
  `password` varchar(255) DEFAULT NULL,
  `info` varchar(255) DEFAULT NULL,
  `ava_url` varchar(255) DEFAULT NULL,
  `token` varchar(255) DEFAULT NULL,
  `salt` varchar(255) DEFAULT NULL,
  `login_time` datetime DEFAULT NULL,
  `status` tinyint(1) DEFAULT '0' COMMENT '默认0有效1无效',
  `delete_flag` tinyint(1) DEFAULT '0' COMMENT '默认0未删除1删除',
  `created_by` int(11) DEFAULT NULL,
  `created_time` datetime DEFAULT NULL,
  `update_by` int(11) DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of user
-- ----------------------------
BEGIN;
INSERT INTO `user` VALUES (1, 'admin', '$2y$10$cnjINJTVAo4lMiok7vUCGOaP4MF3yu6YH7wWwqZczZiQJPufohFYG', '我是超级管理员', 'http://dns.shmilyi.cn/1622683110.jpeg', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJ0cHYueCIsImF1ZCI6InRwdi54IiwiaWF0IjoxNjIzMzc2MDM4LCJleHAiOjE2MjMzNzk2MzgsInVzZXJfaWQiOjF9.Wy_eMC5j5a9JfFrpDZm2Dr8EGwoAJkWQAJq6cl5EM6g', 'P39ms', '2021-06-11 09:47:18', 0, 0, 0, '2021-06-10 11:50:02', 1, '2021-06-11 09:47:18');
INSERT INTO `user` VALUES (2, '测试1', '$2y$10$rfpeNz1w/aQcwoB/MDVyZ.usa5p6/lkYsTFDa/bo185q5srYFjgoa', '测试账号11', 'http://dns.shmilyi.cn/1622683110.jpeg', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJ0cHYueCIsImF1ZCI6InRwdi54IiwiaWF0IjoxNjIzMzE2NTIwLCJleHAiOjE2MjMzMjAxMjAsInVzZXJfaWQiOjJ9.wz6NP0dcrL5Y5QIfy3nN2g98nOTbaaS5V0C1_7ayoXM', '2eScn', '2021-06-10 17:15:20', 0, 0, 0, '2021-06-10 11:52:53', 1, '2021-06-10 19:49:04');
COMMIT;

-- ----------------------------
-- Table structure for user_role
-- ----------------------------
DROP TABLE IF EXISTS `user_role`;
CREATE TABLE `user_role` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) DEFAULT NULL,
  `role_id` int(11) DEFAULT NULL,
  `status` tinyint(1) DEFAULT '0' COMMENT '默认0有效 1无效',
  `delete_flag` tinyint(1) DEFAULT '0' COMMENT '默认 0未删除 1已删除',
  `created_by` int(11) DEFAULT NULL,
  `created_time` datetime DEFAULT NULL,
  `update_by` int(11) DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of user_role
-- ----------------------------
BEGIN;
INSERT INTO `user_role` VALUES (1, 1, 2, 0, 0, 0, '2021-06-10 11:50:02', NULL, NULL);
INSERT INTO `user_role` VALUES (2, 2, 1, 0, 0, 0, '2021-06-10 11:52:53', 0, '2021-06-10 13:01:01');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
